package psn.zjk.common.jdk.juc;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;

/**
 * @USER white
 * @DATETIME 2020/12/29 18:52
 */
public class CompletableFutureTest {


    public static void main(String[] args) throws ExecutionException, InterruptedException {
        CompletableFuture<Object> objectCompletableFuture = new CompletableFuture<>();
        CompletableFuture<Object> objectCompletableFuture1 = CompletableFuture.supplyAsync(() -> {
            return null;
        });
        Object o = objectCompletableFuture1.get();
        objectCompletableFuture.complete(1);
    }

}
